﻿using Ha666.Common;
using Ha666.Redis;

namespace Ha666.WebAPI
{
    /// <summary>
    /// 初始化服务器参数
    /// </summary>
    public class InitServerParams
    {
        public static void DoWork()
        {
            InitMongoAddress();
        }

        /// <summary>
        /// 初始化Mongo地址
        /// </summary>
        private static void InitMongoAddress()
        {
            ProtobufKey key = new ProtobufKey("ha666.mongoaddress");
            MongoAddress address = new MongoAddress { Address = "127.0.0.1", Port = 27017 };
            key.Set(0, address);
        }
    }
}